import { lazy } from 'ice';
import Layout from '@/Layouts/BasicLayout';

const Dashboard = lazy(() => import('@/pages/Dashboard'));
const EditTable = lazy(() => import('@/pages/EditTable'));
const Login = lazy(() => import('@/pages/Login'));

const routerConfig = [
  {
    path: '/login',
    component: Login
  },
  {
    path: '/',
    component: Layout,
    children: [{
      path: '/dashboard',
      component: Dashboard,
    }, {
      path: '/table',
      component: EditTable,
    }, {
      path: '/',
      redirect: '/dashboard',
    }]
  },
];

export default routerConfig;
